Wind and Gravity - Use the Force |
Earth Or Moon: Gravity And Slow MotionOverviewNewton told us about gravity. We learned that an apple falls at the same rate as a grape. We also learned that objects accelerate as they fall. And we were taught that objects fell at about 9.8 m/s^2. This section discusses how 3D Flag uses gravity to make a flag drop naturally, and how we can set gravity to a value other than 9.8 to simulate other environments, like being on the moon, or under water. The Pull Of GravityThe flags that 3D Flag creates are made up of a grid of points. Each point has a weight (a mass), and gravity pulls each point downward using the standard gravity equation mentioned above. Gravity is different than wind speed because wind affects each point on the flag differently. Gravity, by contrast, affects each point on the flag equally. So, while wind is blowing the flag in one direction, gravity is tugging it down. The two forces work together to create a natural look. Putting A Flag On The MoonAs you may know, the moon doesn't have as much gravity as the earth. Astronauts float as they leap from point to point. In fact, the moon has only 1/6 of the gravity of earth, so objects only fall about 1.6 m/s^2.
We can simulate a flag on the moon by setting Gravity to 1.6 and by slowing down our Wind Speed.
Slow MotionLet's go one step further and find out how to put a flag into slow motion. We'll use the same principals discussed above. We'll lower Wind Speed and Gravity, making sure that the gravity is really low, and that the wind speed is just fast enough for the flag to keep its shape.
You can combine Wind Speed and Gravity to simulate some interesting environments. There is one remaining Forces parameter that we have not discussed. In the next section, Using Pre-Roll To Find The Perfect Wave, we'll see how the Pre-Roll parameter can help us start our animation at the right moment.
|